<?php 
	$url = trim($_SERVER['SERVER_NAME'] . $_SERVER ['REQUEST_URI']);
	
	$array = explode("/", $url);
	
	if (trim(ENVIRONMENT) == "development"){
		if (trim($array[2]) === "admin" || trim($array[2]) === "home"){
			header('Location: http://localhost/valt/admin/erros');
		}else{
			header('Location: http://localhost/valt/');
		}
	}else{
		if (trim($array[1]) === "admin" || trim($array[1]) === "home"){
			header('Location: http://www.valtsolucoesti.com.br/admin/erros');
		}else{
			header('Location: http://www.valtsolucoesti.com.br/');
		}
	}
?>